package com.nx.samuel.delay_demo.consumer;

import com.nx.samuel.delay_demo.api.HelloService;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public class DelayConsumer {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("dubbo-consumer.xml");
        context.start();

        while (true) {
            try {
                HelloService helloService = context.getBean("helloService", HelloService.class);
                String result = helloService.sayHello("nxnxnx");
                System.out.println(result);
                return;
            } catch (Exception e) {

            }
        }
    }
}
